package com.lagou.service.impl;

import com.lagou.dao.AuthCodeDao;
import com.lagou.pojo.AuthCode;
import com.lagou.service.AuthCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class AuthCodeServiceImpl implements AuthCodeService {

    @Autowired
    private AuthCodeDao authCodeDao;

    @Override
    public void save(AuthCode authCode) {
        authCodeDao.save(authCode);
    }

    @Override
    public AuthCode findOneByEmailAndCode(String email, String code) {
        return authCodeDao.findByEmailAndCode(email,code);
    }

}
